package com.cash.app.utils.extra.model

import com.google.gson.annotations.SerializedName
import com.cash.app.utils.extra.tools.OtherUtils

class StorageData {
    @SerializedName("ua_ram_total_size")
    var ram_total_size: Long = 0

    @SerializedName("ua_ram_usable_size")
    var ram_usable_size: Long = 0

    @SerializedName("ua_internal_storage_total")
    var internal_storage_total: Long = 0

    @SerializedName("ua_internal_storage_usable")
    var internal_storage_usable: Long = 0

    @SerializedName("ua_memory_card_size")
    var memory_card_size: Long = 0

    @SerializedName("ua_memory_card_size_use")
    var memory_card_size_use: Long = 0

    init {
        try {
            ram_total_size = OtherUtils.totalMemory
            ram_usable_size = OtherUtils.availMemory
            internal_storage_total = OtherUtils.internalTotalSize
            internal_storage_usable = OtherUtils.internalAvailableSize
            //        memory_card_size = getExternalTotalSize();
//        memory_card_size_use = getExternalTotalSize() - getExternalAvailableSize();
        } catch (e: java.lang.Exception) {
            e.printStackTrace()
        }
    }

    override fun toString(): String {
        return "StorageData(" +
                "ram_total_size=$ram_total_size, " +
                "ram_usable_size=$ram_usable_size, " +
                "internal_storage_total=$internal_storage_total, " +
                "internal_storage_usable=$internal_storage_usable, " +
                "memory_card_size=$memory_card_size, " +
                "memory_card_size_use=$memory_card_size_use" +
                ")"
    }
}